package com.bwie.product.controller;

import com.bwie.common.core.domain.Result;
import com.bwie.product.service.ProductService;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@RequestMapping("/product")
@RestController
@CrossOrigin
@Log4j2
public class ProductController {
    @Autowired
    private HttpServletRequest request;
    @Autowired
    private ProductService productService;

    /**
     * sku商品详情
     * @param skuId
     * @return
     */
    @GetMapping("/productDetail/{skuId}")
    public Result productDetail(@PathVariable Long skuId) {
        Result result = productService.productDetail(skuId);
        return result;
    }


}
